#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
int main()
{
    int fd = open("log.txt",O_RDONLY);
    dup2(fd,0);
    
    char buffer[1024];
    size_t s = read(0,buffer,sizeof(buffer));
    if(s > 0)
    {
        printf("%s\n",buffer);
    }
    

    return 0;

}
